package com.lrs.java.j2se_self.collection;

import java.util.*;
public class TestArgWordsNew {
	private static final int ONE = 1;
	public static void main(String[] args){
		Map<String,Integer> m = new HashMap<String,Integer> ();
		if(args.length <= 0){
			System.out.println("your input is wrong!");
		}
		for(int i=0;i<args.length;i++){
			if(!m.containsKey(args[i])){
				m.put(args[i], ONE);
			}else{
				int freq = m.get(args[i]);
				m.put(args[i],freq+1);
			}
		}
		System.out.println(m.size());
		System.out.println(m);
	}
}
